{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "b9b4f9fc",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "score1 = np.random.randint(0,101,size = (50,3))\n",
    "score2 = np.random.randint(0,101,size = (50,3))\n",
    "score3 = np.random.randint(0,101,size = (50,3))\n",
    "score4 = np.random.randint(0,101,size = (50,3))\n",
    "score5 = np.random.randint(0,101,size = (50,3))\n",
    "score6 = np.random.randint(0,101,size = (50,3))\n",
    "score = np.vstack((score1,score2,score3,score4,score5,score6))\n",
    "sex = np.random.randint(0,2,size = (300,1))\n",
    "data = np.hstack((score,sex))\n",
    "male = data ==1\n",
    "female = data == 0\n",
    "boy =data[male[:,3]]\n",
    "girl=data[female[:,3]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "ffb40684",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 0])"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boyMin = np.array([np.min(boy[:,0]),np.min(boy[:,1]),np.min(boy[:,2])])\n",
    "boyMin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "fd3dc664",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 0])"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "girlMin = np.array([np.min(girl[:,0]),np.min(girl[:,1]),np.min(girl[:,2])])\n",
    "girlMin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "c1a0e5b2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([100, 100, 100])"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boyMax = np.array([np.max(boy[:,0]),np.max(boy[:,1]),np.max(boy[:,2])])\n",
    "boyMax"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "6d289e06",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([100, 100,  98])"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "girlMax = np.array([np.max(girl[:,0]),np.max(girl[:,1]),np.max(girl[:,2])])\n",
    "girlMax"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "id": "885977c1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([48.93243243, 50.2027027 , 55.54054054])"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boyMean = np.array([np.mean(boy[:,0]),np.mean(boy[:,1]),np.mean(boy[:,2])])\n",
    "boyMean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "e4fcca8f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([48.97368421, 51.09210526, 49.48026316])"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "girlMean = np.array([np.mean(girl[:,0]),np.mean(girl[:,1]),np.mean(girl[:,2])])\n",
    "girlMean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "04ddd482",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([48. , 47. , 57.5])"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boyMedian = np.array([np.median(boy[:,0]),np.median(boy[:,1]),np.median(boy[:,2])])\n",
    "boyMedian"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "9ac0b766",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([46. , 49.5, 47.5])"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "girlMedian = np.array([np.median(girl[:,0]),np.median(girl[:,1]),np.median(girl[:,2])])\n",
    "girlMedian"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "a93301e2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([29.80151959, 30.03263078, 29.56883366])"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boyStd = np.array([np.std(boy[:,0]),np.std(boy[:,1]),np.std(boy[:,2])])\n",
    "boyStd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "d0b4e8d6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([27.62530004, 29.84176587, 28.19177054])"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "girlStd = np.array([np.std(girl[:,0]),np.std(girl[:,1]),np.std(girl[:,2])])\n",
    "girlStd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "285c13dd",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
